<%@ Page Language="VB" AutoEventWireup="false" Title="Admin - Notifications Settings" CodeFile="alertsNotificationSettings.aspx.vb" Inherits="admin_alertsNotificationSettings" MasterPageFile="~/admin/admin.master" %>
<%@ Register Src="SubNavControls/AlertSubNavControl.ascx" TagName="AlertSubNavControl" TagPrefix="uc1" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<uc1:AlertSubNavControl ID="AlertSubNavCtrl" runat="server" />

<table cellpadding="0" cellspacing="0">
<tr><td style="width:20px;" rowspan="2"></td><td><h1><a id="pagecontent">Admin - Notifications Settings</a></h1></td></tr>
<tr><td align="left"><cc2:ScrollingGridView ID="NotificationsScrollingGridView" runat="server" CssClass="gridOffset" IsFixedColumn="true" AutoGenerateColumns="False" ToolTip="175" InnerTableDifference="40"
            DataSourceID="AlertsNotificationsObjectDataSource" DataKeyNames="Id" Cellspacing="0" CellPadding="5" BorderColor="#21334B" Caption="Define Notifications and who will receive them." CaptionAlign="Top"
                BorderStyle="Solid" GridLines="Vertical" AllowSorting="true">
        <HeaderStyle  CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
        <RowStyle CssClass="adminColumnStyle" />
        <Columns>
            <asp:BoundField DataField="NotificationSubject" SortExpression="NotificationSubject" HeaderStyle-Width="205px" ItemStyle-Width="190px" HeaderText="Subject" Readonly="True"/>
            <asp:TemplateField HeaderText="Long Text" SortExpression="NotificationSubject">
            <ItemStyle Width="300px" />
            <HeaderStyle Width="300px" />
                <ItemTemplate><%#Eval("NotificationText")%></ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtSubject" CssClass="form" runat="server" Text='<%# Bind("NotificationText") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText="Send Email" SortExpression="WillEmail" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="70px">
            <ItemStyle HorizontalAlign="center" Width="75px" />
            <HeaderStyle Width="75px" />
            <ItemTemplate>
                <asp:Image ID="WillEmailImage" runat="server" ImageUrl="~/images/blankcheck.gif" />
            </ItemTemplate>
            <EditItemTemplate>
                <asp:CheckBox  ID="EditWillEmailCheckbox"  runat="server" Checked='<%#Bind("WillEmail") %>' ToolTip="Will this notification be accompanied by an email?" />
            </EditItemTemplate>
        </asp:TemplateField>
            <asp:BoundField DataField="DaysActive" SortExpression="DaysActive" HeaderText="Days Active">
                <ItemStyle HorizontalAlign="Center" Width="80px" />
                <HeaderStyle Width="80px" />
            </asp:BoundField>
            <asp:CommandField EditText="Edit" ShowEditButton="True" HeaderText="Action" AccessibleHeaderText="Action">
                <ItemStyle HorizontalAlign="Center" Width="55px" />
                <HeaderStyle Width="55px" />
            </asp:CommandField>
            <asp:HyperLinkField NavigateUrl="~/admin/PermissionsByType.aspx?PermissionType=Notification" Text="Edit Recipient List" HeaderText="Link" AccessibleHeaderText="Link">
                <ItemStyle HorizontalAlign="Center" Width="120px" />
                <HeaderStyle Width="150px" />
            </asp:HyperLinkField>
        </Columns>
        <AlternatingRowStyle BackColor="#E8ECF4" /></cc2:ScrollingGridView>
        </td></tr>        
        </table>

    <asp:ObjectDataSource ID="AlertsNotificationsObjectDataSource" runat="server"
        DeleteMethod="RemoveInstance" InsertMethod="SaveInstance" SelectMethod="ListBySort"
        TypeName="Cdm.DataCore.CaseNotes.Notification" DataObjectTypeName="Cdm.DataCore.CaseNotes.Notification"
        UpdateMethod="UpdateInstance" SortParameterName="sortExpr" >
    </asp:ObjectDataSource>
</asp:Content>
